home *** CD-ROM | disk | FTP | other *** search
- % This sample shows how to
- % - edit the same floating point number with 2 different formats:
- % a) in [1/10N] (object TEST01)
- % b) 1:1, no conversion (object TEST02)
- % - the function of the "ff" (float-format) command:
- % ff( ("%12.7f") ("[1/10N]") 10 ); generates the output of the
- % VAR-PARAMETER in the following way:
- % sprintf(VAR-PARAMETERstring,"%12.7f [1/10N]",number/10);
-
- Malloc(90); @xbwstart( ("t") ("bw") ); wdw(TEST 1 1 25 9 StandardWDW);
-
- o(TEST01 D D 1 3 23 1 Standard); % First Float Object
- bg(TEST01 . 123.45 ); % VAR-PARAMETER is 1234
- ff( ("%12.7f") ("[1/1.3]") 1.3 ); % SCALE 1/1.3
- eg();
-
- o(TEST02 D D 1 5 23 1 Standard); % Second Float Object
- bg(TEST02 . (ptr)OBJ:TEST01.V); %<--- Pointer to VAR-PARAMETER above!
- ff( ("%12.7f") ("[1]") 1 ); % SCALE 1:1
- eg();
-
- o(TEST03 S S 14 7 10 1 Secure 1 1 0 ); % EXIT Button
- bg(TEST03 . ("Stop XbW") );
- cn(rqK ("@xbwstop();") );
- eg();
-
- Message( ("Project Complete.") );
- End();
-
-